#
# Be sure to run `pod lib lint SweetWeexPlugin.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
    s.name             = 'SweetWeexPlugin'
    s.version          = '0.1.2'
    s.summary          = 'for SweetWeexKit Plugin，主要存放SweetWeexKit一些工具handler、module、'
  
    s.description      = <<-DESC
    TODO: for SweetWeexKit Plugin，主要存放SweetWeexKit一些工具handler、module；为SweetWeexKit插件集合
    DESC
    
#    s.homepage         = 'http://git.evun.cn/ADMP-repository/Sweet-iOS-SweetWeexPlugin'
    s.homepage         = 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-sweetweexplugin'

    # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    s.author           = { '朱帅帅' => 'shuaishuai.zhu@geely.com' }
    
    s.ios.deployment_target = '9.0'

#    s.static_framework = true
    library_type       = "Dynamic"

#  if ENV['mode'].to_s.include? "SweetWeexPlugin"
      #使用zip成果物模式
      puts "SweetWeexPlugin成果物模式集成".blue
      s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/SweetWeexPlugin.framework-0.1.2.zip' }
      s.ios.vendored_framework   = 'SweetWeexPlugin.framework'
      
#  else
#      #目前默认源码集成
#      puts "SweetWeexPlugin源码模式集成".yellow
#      s.source           = { :git => 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-sweetweexplugin.git', :tag => s.version.to_s }
#      s.source_files = 'SweetWeexPlugin/Classes/**/*.{h,m}'
#      s.ios.public_header_files  = 'SweetWeexPlugin/Classes/**/*.h'
#
#  end
    

    s.dependency 'SweetWeexKit'
    s.dependency 'SweetCordovaKit'
    # Weex插件库
    s.dependency 'WeexActionSheet'
    s.dependency 'BindingX'
    # Nat系列
    s.dependency 'WeexNatCamera'
    s.dependency 'WeexNatStream'

      #   SweetWeexPlugin was resolved to 0.0.6, which depends on
      # WeexNatMediaImage was resolved to 1.0.1, which depends on
      #   NatImage was resolved to 0.0.5, which depends on
      #     SDWebImage (!= 3.7.2, ~> 3.7)
   # s.dependency 'WeexNatMediaImage'
   
    s.dependency 'WeexNatGeolocation'
    s.dependency 'WeexNatDeviceNetwork'
    s.dependency 'WeexNatDeviceVibration'
    s.dependency 'WeexNatDeviceInfo'
    s.dependency 'WeexNatDeviceScreen'
    s.dependency 'WeexNatSensorAccelerometer'
    s.dependency 'WeexNatSensorCompass'
    s.dependency 'WeexNatRecorder'
    s.dependency 'WeexNatModal'
    s.dependency 'WeexNatMediaVideo'
    s.dependency 'WeexNatMediaAudio'
    s.dependency 'WeexNatTransfer'
    s.dependency 'WeexNatCommunication'
    s.dependency 'WeexNatDeviceBattery'
    
    # s.dependency 'WeexGcanvas'
    # 导入WeexNatMediaImage到本地，这里添加他的相关引用
    #s.dependency "TZImagePickerController", "~> 3.2.1"
    #s.dependency 'MBProgressHUD', '~> 1.0.0'
    #s.dependency 'DACircularProgress', '~> 2.3'
    
    s.dependency "TZImagePickerController"
    s.dependency 'MBProgressHUD'
    s.dependency 'DACircularProgress'
    s.dependency 'SDWebImage'
    s.dependency 'Countly'
    # 钥匙串存储
    s.dependency 'SAMKeychain'
    #s.dependency 'ZSMWPhotoBrowser'

    s.dependency 'Base64'

    
    #------------------ 组件info配置 --------------------------
    #s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }
    # 设置target不支持bitcode

    s.pod_target_xcconfig  = {
      'FRAMEWORK_SEARCH_PATHS'        => '$(inherited) ${PODS_ROOT}/**',
      'LIBRARY_SEARCH_PATHS'          => '$(inherited) ${PODS_ROOT}/**',
      'ENABLE_BITCODE'                => 'NO',
      'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
      'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
    }
    
end
